﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using TVShows.Data;
using TVShows.DataModels;
using TVShows.Data.ITVShowAdapters.Interfaces;
using TVShows.Data.ITVShowAdapters.Adapters;

namespace TVShows.Web.Controllers
{
    public class HomeController : Controller
    {
        ITVShowAdapter _adapter;
        public HomeController()
        {
            _adapter = new TVShowAdapter();
        }
        public HomeController(ITVShowAdapter adapter)
        {
            _adapter = adapter;
        }
        public ActionResult Index()
        {
            List<TVShow> tvshows = _adapter.GetAllTVShows();
            return View(tvshows);
        }

    }
}